function drawDynamicRose
% 参数设置
n = 800;
A = 1.995653; B = 1.27689; C = 8;
r = linspace(0, 1, n);
theta = linspace(-2, 20*pi, n);
[R, THETA] = ndgrid(r, theta);

% 花瓣形状控制
petalNum = 3.6; % 控制花瓣密度（3.6为自然卷曲效果）
x = 1 - (1/2)*((5/4)*(1 - mod(petalNum*THETA, 2*pi)/pi).^2 - 1/4).^2;
phi = (pi/2).*exp(-THETA/(C*pi)); % 花瓣弯曲函数
y = A*(R.^2).*(B*R - 1).^2 .* sin(phi);

% 三维坐标转换
R2 = x .* (R.*sin(phi) + y.*cos(phi));
X = R2 .* sin(THETA);
Y = R2 .* cos(THETA);
Z = x .* (R.*cos(phi) - y.*sin(phi));

% 动态渲染设置
figure('Color','k', 'Renderer','opengl');
surfHdl = surf(X, Y, Z, 'EdgeColor','none', 'FaceAlpha',0.95);
hold on;

% 自定义渐变色映射（深红到浅粉）
redMap = [
    0 0 0;   % 核心深红
    0 0 0;   % 中间过渡
    0.85 0.62 0.13;   % 花瓣边缘
    0.96 0.73 0.44    % 高光浅粉
    ];
colormap(interp1(linspace(0,1,size(redMap,1)), redMap, linspace(0,1,256)));

% 光源与材质效果
material([0.6 0.9 0.3 10 0.5]); % 调整材质反光属性
camlight left;
lighting gouraud;
view(-40, 42); % 初始视角
axis equal off;

% 动态旋转
thetaRot = 0;
while ishandle(surfHdl)
    thetaRot = thetaRot + 0.02;
    set(surfHdl, 'XData', X*cos(thetaRot) - Y*sin(thetaRot),...
        'YData', X*sin(thetaRot) + Y*cos(thetaRot));
    drawnow;
end
end